export type GetAccountPageReq = {
  pageParameter: {
    currentPage: number
    pageSize: number
  }
  realName: string
  userName: string
}

export type AccountItem = {
  createTime: string
  deleteFlag: number
  id: number
  password: string
  realName: string
  roleId: number
  updateTime: string
  userName: string
}

export type GetAccountListRes = {
  dataList: Array<AccountItem>
  page: {
    currentPage: number
    nextPage: number
    offset: number
    pageSize: number
    prePage: number
    totalCount: number
    totalPage: number
  }
}

export type ResetPasswordReq = {
  id: number
  password: string
}

export type Permission = {
  children: Array<Permission>
  sort: number
  id: number
  method: string
  parentId: number
  permission: string
  serviceName: string
  sourceName: string
  sourceUrl: string
}

export type AddAccountReq = {
  id: number
  permissions: Array<{ id: number }>
  realName: string
  userName: string
}

export type FormState = {
  id: number
  realName: string
  userName: string
  permissions: Array<{ id: number }>
}
